﻿@using KL.Store.Core
@{
    Layout = null;
}
@if (!string.IsNullOrEmpty(Parameters.HomeLightboxOnReady))
{
    if (!HttpContext.Current.Request.Cookies.AllKeys.Contains(Parameters.HomeLightboxOnReadyName))
    {

        HttpCookie cookie = new HttpCookie(Parameters.HomeLightboxOnReadyName);
        cookie.Value = "homeLightboxAdded";
        cookie.Expires = DateTime.Now.AddDays(Parameters.HomeLightboxOnReadyExpireDayCount);
        HttpContext.Current.Response.Cookies.Add(cookie);
                    
    <div style="display: none;">
        <a href="#HomeLightboxOnReady" id="HomeLightboxOnReadyTrigger"></a>
        <div id="HomeLightboxOnReady">
            <div class="HomeLightboxOnReadyInner">
                @Html.Raw(Parameters.HomeLightboxOnReady)
            </div>
        </div>
    </div>
    <script>
        $(document).ready(function ()
        {
            $('#HomeLightboxOnReadyTrigger').fancybox({
                openMethod: 'changeIn',
                closeMethod: 'zoomOut',
                helpers: {
                    title: null
                },
                padding: 0
            }).trigger('click');
        });
    </script>
    }
}